home *** CD-ROM | disk | FTP | other *** search
Makefile | 1997-01-19 | 14.0 KB | 443 lines | [TEXT/MPS ] |
- #######################################################################
- # Project : Perl 5
- # File : Makefile - Build everything except examples
- # Author : Matthias Neeracher
- # Language : MPW Shell/Make
- #
- # $Log: Makefile,v $
-
- MAKE = BuildProgram
-
- O = ":Obj:"
- # Add -d LEAKTEST -d DUMPADDR -d MALLOC_LOG as you see fit
- DOpt = -d DEBUGGING
- COpt = $(DOpt) -d MULTIPLICITY -w off -sym on
- C68K = MWC68K $(COpt) -mc68020 -model far -opt all
- C680 = MWC68K $(COpt) -model far -opt all
- # Use -d PESSIMIZE for machines with not enough memory
- CPPC = MWCPPC $(COpt) -traceback -opt all
- ROptions = -i :
- Lib68K = MWLink68K -xm library -sym on
- LibPPC = MWLinkPPC -xm library -sym on
- LOpt = -sym on -w -xm mpwtool
- Link68K = MWLink68K $(LOpt) -model far
- LinkPPC = MWLinkPPC $(LOpt)
-
- YACC = yacc
-
- UnPreloadLibs = "{{MW68KLibraries}}MacOS.Lib" \
- "{{MW68KLibraries}}ToolLibs.o" \
- "{{MW68KLibraries}}PLStringFuncs.glue.lib" \
- "{{MW68KLibraries}}CPlusPlus.lib" \
- "{{MW68KLibraries}}MPWRuntime.68K.Lib" \
- "{{MW68KLibraries}}MPW ANSI (4i/8d) C.68K.Lib" \
- "{{MW68KLibraries}}MathLib68K (4i/8d).Lib"
- LibFiles68K = "{{MW68KLibraries}}MacOS.Lib" \
- :PLib:PerlLib.68K.Lib \
- "{{MW68KLibraries}}GUSIDispatch.Lib.68K" \
- "{{MW68KLibraries}}GUSIMPW.Lib.68K" \
- "{{MW68KLibraries}}ToolLibs.o" \
- "{{MW68KLibraries}}PLStringFuncs.glue.lib" \
- "{{MW68KLibraries}}CPlusPlus.lib" \
- "{{MW68KLibraries}}MPWRuntime.68K.Lib" \
- "{{MW68KLibraries}}MPW ANSI (4i/8d) C.68K.Lib" \
- "{{MW68KLibraries}}MathLib68K (4i/8d).Lib" \
- "{{MW68KLibraries}}GUSI.Lib.68K"
- MoLibs68K = "{{MW68KLibraries}}db.Lib.68K" \
- "{{MW68KLibraries}}"XL.Lib.68K \
- "{{MW68KLibraries}}OSACompLib.o"
- BigLibs68K = "{{MW68KLibraries}}AEGizmos M/4i" \
- "{{MW68KLibraries}}GD.68K.Lib" \
- "{{MW68KLibraries}}ICGlueFar.o" \
- "{{MW68KLibraries}}PLStringFuncs.glue.lib"
- LibFiles680 = "{{MW68KLibraries}}MacOS.Lib" \
- "{{MW68KLibraries}}ToolLibs.o" \
- "{{MW68KLibraries}}PLStringFuncs.glue.lib" \
- :PLib:PerlLib.680.Lib \
- "{{MW68KLibraries}}GUSIDispatch.Lib.68K" \
- "{{MW68KLibraries}}GUSIMPW.Lib.68K" \
- "{{MW68KLibraries}}CPlusPlus.lib" \
- "{{MW68KLibraries}}MPWRuntime.68K.Lib" \
- "{{MW68KLibraries}}MPW ANSI (4i/8d) C.68K.Lib" \
- "{{MW68KLibraries}}MathLib68K (4i/8d).Lib" \
- "{{MW68KLibraries}}GUSI.Lib.68K"
-
- LibFilesPPC = \
- "{{MWPPCLibraries}}libmoto" \
- "{{MWPPCLibraries}}GUSIMPW.Lib.PPC" \
- "{{MWPPCLibraries}}GUSI.Lib.PPC" \
- :PLib:PerlLib.PPC.Lib \
- "{{MWPPCLibraries}}MWMPWCRuntime.Lib" \
- "{{MWPPCLibraries}}InterfaceLib" \
- "{{MWPPCLibraries}}MPW ANSI.C.PPC.Lib" \
- "{{MWPPCLibraries}}StdCLib" \
- "{{MWPPCLibraries}}MathLib" \
- "{{MWPPCLibraries}}PPCToolLibs.o"
- MoLibsPPC = "{{MWPPCLibraries}}db.Lib.PPC" \
- "{{MWPPCLibraries}}"XL.Lib.PPC \
- "{{MWPPCLibraries}}"x80.o \
- "{{MWPPCLibraries}}AppleScriptLib"
-
- LNS = Perl -e 'symlink($ARGV[0], $ARGV[1])'
- RMS = delete -y
-
- public = perl bigperl translators
- Dynamic_Ext = Mac GD-1.00
- Static_Ext = MacPerl:MacPerl \
- DynaLoader:DynaLoader \
- NDBM_File:NDBM_File \
- DB_File:DB_File \
- Socket:Socket \
- Fcntl:Fcntl \
- Safe:Safe \
- POSIX:POSIX \
- IO:IO \
- UNIVERSAL:UNIVERSAL
- Big_Static_Ext = $(Static_Ext) \
- Mac:Mac \
- GD-1.00:GD
- Static_Ext_AutoInit = $(Static_Ext:f)
- Big_Static_Ext_AutoInit = $(Big_Static_Ext:f)
- More_Static_Ext = OSA XL
- Static_Ext_AutoInit_PPC = :ext:{$(Static_Ext)}.Lib.PPC
- Static_Ext_AutoInit_68K = :ext:{$(Static_Ext)}.Lib.68K
- Big_Static_Ext_AutoInit_68K = :ext:{$(Big_Static_Ext)}.Lib.68K
-
- .SOURCE.o : ":Obj:"
- .SOURCE.68K : ":Obj:"
- .SOURCE.680 : ":Obj:"
- .SOURCE.PPC : ":Obj:"
- .SOURCE.c : ":"
- .SOURCE.cp : ":"
-
- %.c.68K.o : %.c
- Set Echo 0
- Set Src68K "{{Src68K}} $<"
- %.c.680.o : %.c
- Set Echo 0
- Set Src680 "{{Src680}} $<"
- %.c.PPC.o : %.c
- Set Echo 0
- Set SrcPPC "{{SrcPPC}} $<"
- %.cp.68K.o : %.cp
- Set Echo 0
- Set Src68K "{{Src68K}} $<"
- %.cp.680.o : %.cp
- Set Echo 0
- Set Src680 "{{Src680}} $<"
- %.cp.PPC.o : %.cp
- Set Echo 0
- Set SrcPPC "{{SrcPPC}} $<"
- %.c.o.68K : %.c
- $(C68K) -t -ext .o.68K $< -o :Obj:
- %.c.o.680 : %.c
- $(C680) -t -ext .o.680 $< -o :Obj:
- %.c.o.PPC : %.c
- $(CPPC) -t -ext .o.PPC $< -o :Obj:
- %.cp.o.68K : %.cp
- $(C68K) -t -ext .o.68K $< -o :Obj:
- %.cp.o.680 : %.cp
- $(C680) -t -ext .o.680 $< -o :Obj:
- %.cp.o.PPC : %.cp
- $(CPPC) -t -ext .o.PPC $< -o :Obj:
-
- private = preplibrary :lib:ExtUtils:Miniperl.pm :lib:Config.pm
-
- # Files to be built with variable substitution after miniperl is
- # available. Dependencies handled manually below (for now).
-
- pl = ":pod:pod2html.PL" ":pod:pod2latex.PL" ":pod:pod2man.PL" ":pod:pod2text.PL"
-
- plextract = ":pod:pod2html" ":pod:pod2latex" ":pod:pod2man" ":pod:pod2text"
-
- addedbyconf = UU $(plextract) pstruct
-
- h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h
- h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h
- h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h
- h4 = regexp.h scope.h sv.h unixish.h util.h
- h = $(h1) $(h2) $(h3) $(h4)
-
- c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c
- c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c
- c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c globals.c
- cm = macish.c SubLaunch.c crypt.c HandleSocket.cp
-
- c = $(c1) $(c2) $(c3) $(cm)
- cp= $(cpm)
- libc = missing.c icemalloc.c
-
- Objects68K = {$(c)}.68K.o
- Objects680 = {$(c)}.680.o
- ObjectsPPC = {$(c)}.PPC.o
- LibObjects68K = {$(libc)}.o.68K
- LibObjects680 = {$(libc)}.o.68K
- LibObjectsPPC = {$(libc)}.o.PPC
-
- .PHONY : translators
-
- all: miniperl $(private) $(plextract) $(public) dynlibrary runperl
- @echo " "; echo " Everything is up to date."
-
- Obj:
- NewFolder Obj
-
- PLib:
- NewFolder PLib
-
- translators: miniperl :lib:Config.pm
- @echo " Making x2p stuff";
- Directory x2p;
- set echo 0
- BuildProgram all
- set echo 1
- Directory ::
-
-
- # This is now done by installman only if you actually want the man pages.
- # @echo " "; echo " Making docs"; cd pod; $(MAKE) all;
-
- # MWLink68K preloads the generated segments, which is not good for huge fat
- # tools. UnPreload undoes this.
-
- UnPreload: UnPreload.c.o.68K
- $(Link68K) -o UnPreload :Obj:UnPreload.c.o.68K $(UnPreloadLibs)
-
- # The $& notation tells Sequent machines that it can do a parallel make,
- # and is harmless otherwise.
- # The miniperl -w -MExporter line is a basic cheap test to catch errors
- # before make goes on to run preplibrary and then MakeMaker on extensions.
- # This is very handy because later errors are often caused by miniperl
- # build problems but that's not obvious to the novice.
- # The Module used here must not depend on Config or any extensions.
-
- miniperl: Obj PLib UnPreload miniperl.PPC miniperl.68K
- Duplicate -y miniperl.PPC miniperl
- Echo 'Include "miniperl.68K" '∂''CODE'∂'';Include "miniperl.68K" '∂''DATA'∂'';' ∂
- | Rez -a -c 'MPS ' -t MPST -o miniperl
- UnPreload miniperl
- :miniperl -w -Ilib -MExporter -e 0 || BuildProgram minitest
- miniperl.68K: :PLib:Perl.68K.Lib :PLib:PerlLib.68K.Lib miniperlmain.c.o.68K
- $(Link68K) -o miniperl.68K :Obj:miniperlmain.c.o.68K $(LibFiles68K) :PLib:Perl.68K.Lib
- miniperl.68K:: Perl.r Perl.rsrc
- Rez -a -c 'MPS ' -t MPST Perl.r -o miniperl.68K
- miniperl.680: :PLib:Perl.680.Lib :PLib:PerlLib.680.Lib miniperlmain.c.o.680
- $(Link680) -o miniperl.680 :Obj:miniperlmain.c.o.680 $(LibFiles680) :PLib:Perl.680.Lib
- miniperl.680:: Perl.r Perl.rsrc
- Rez -a -c 'MPS ' -t MPST Perl.r -o miniperl.680
- miniperl.PPC: :PLib:Perl.PPC.Lib :PLib:PerlLib.PPC.Lib miniperlmain.c.o.PPC
- $(LinkPPC) -o miniperl.PPC :Obj:miniperlmain.c.o.PPC $(LibFilesPPC) :PLib:Perl.PPC.Lib
- miniperl.PPC:: Perl.r Perl.rsrc
- Rez -a -c 'MPS ' -t MPST Perl.r -o miniperl.PPC
-
- perlmain.c: miniperl miniperlmain.c Makefile.mk
- miniperl writemain $(Static_Ext_AutoInit) $(More_Static_Ext) > perlmain.c
- bigperlmain.c: miniperl miniperlmain.c Makefile.mk
- miniperl writemain $(Big_Static_Ext_AutoInit) $(More_Static_Ext) > bigperlmain.c
- runperl.c: miniperl miniperlmain.c Makefile.mk
- miniperl writemain -runperl $(Static_Ext_AutoInit) $(More_Static_Ext) > runperl.c
- runbigperl.c: miniperl miniperlmain.c Makefile.mk
- miniperl writemain -runperl $(Big_Static_Ext_AutoInit) $(More_Static_Ext) > runbigperl.c
-
- perlmain.c.o.PPC: perlmain.c
- perlmain.c.o.68K: perlmain.c
-
- runperl: runperl.c runbigperl.c
- #
- # Library building is rather time consuming for make, so we set preplibrary
- # to prevent further builds until it is deleted.
- #
- preplibrary: miniperl
- :miniperl writediag :lib:diagnostics.pm :pod:perldiag.pod>:lib:newdiagnostics.pm
- Move -y :lib:newdiagnostics.pm :lib:diagnostics.pm
- For i in $(Static_Ext:d)
- directory :ext:{{i}}
- Set Echo 0
- BuildProgram all
- BuildProgram install
- directory :::
- Set Echo 1
- end
- :miniperl -Ilib -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' ∂
- :lib:≈.pm :lib:≈:≈.pm
- Echo > preplibrary
- setfile -m 02/01/2031 preplibrary
-
- bigpreplibrary: miniperl
- For i in $(Big_Static_Ext:d)
- directory :ext:{{i}}
- Set Echo 0
- BuildProgram all
- BuildProgram install
- directory :::
- Set Echo 1
- end
- Echo > bigpreplibrary
- setfile -m 02/01/2031 bigpreplibrary
-
- dynlibrary: perl
- For i in $(Dynamic_Ext)
- directory :ext:{{i}}
- Set Echo 0
- BuildProgram all
- BuildProgram install
- directory :::
- Set Echo 1
- end
- Echo > dynlibrary
- setfile -m 02/01/2031 dynlibrary
-
- perl: UnPreload perl.PPC perl.68K
- Duplicate -y perl.PPC perl
- Echo 'Include "perl.68K" '∂''CODE'∂'';Include "perl.68K" '∂''DATA'∂'';' ∂
- | Rez -a -c 'MPS ' -t MPST -o perl
- UnPreload perl
- perl.68K: :PLib:Perl.68K.Lib :PLib:PerlLib.68K.Lib perlmain.c.o.68K preplibrary
- $(Link68K) -o perl.68K ∂
- :Obj:perlmain.c.o.68K $(LibFiles68K) :Obj:{$(LibObjects68K)} ∂
- :PLib:Perl.68K.Lib $(Static_Ext_AutoInit_68K) $(MoLibs68K)
- perl.68K:: Perl.r Perl.rsrc
- Rez -a -c 'MPS ' -t MPST Perl.r -o perl.68K
- perl.PPC: :PLib:Perl.PPC.Lib :PLib:PerlLib.PPC.Lib perlmain.c.o.PPC preplibrary
- $(LinkPPC) -export all -name Perl -o perl.PPC ∂
- :Obj:perlmain.c.o.PPC $(LibFilesPPC) :Obj:{$(LibObjectsPPC)} ∂
- :PLib:Perl.PPC.Lib $(Static_Ext_AutoInit_PPC) $(MoLibsPPC)
- perl.PPC:: Perl.r Perl.rsrc
- Rez -a -c 'MPS ' -t MPST Perl.r -o perl.PPC
-
- bigperl: :PLib:Perl.68K.Lib :PLib:PerlLib.68K.Lib bigperlmain.c.o.68K bigpreplibrary
- $(Link68K) -o bigperl ∂
- :Obj:bigperlmain.c.o.68K $(LibFiles68K) :Obj:{$(LibObjects68K)} ∂
- :PLib:Perl.68K.Lib $(Big_Static_Ext_AutoInit_68K) $(MoLibs68K) $(BigLibs68K)
-
- # Take care to avoid modifying lib/Config.pm without reason
- ":lib:Config.pm": config.mac miniperl
- :miniperl configpm
-
- ":lib:ExtUtils:Miniperl.pm": miniperlmain.c miniperl minimod.pl ":lib:Config.pm"
- :miniperl minimod.pl > :lib:ExtUtils:Miniperl.pm
-
- $(plextract): miniperl ":lib:Config.pm"
- :miniperl -Ilib $@.PL
-
- install: all install.perl install.man
-
- install.perl: all installperl
- :perl installperl
-
- install.man: all installman
- :perl installman
-
- # Not implemented yet.
- #install.html: all installhtml
- # ./perl installhtml
-
- # I now supply perly.c with the kits, so the following section is
- # used only if you force byacc to run by saying
- # make run_byacc
- # Since we patch up the byacc output, the perly.fixer script needs
- # to run with precisely the same version of byacc as I use. You
- # normally shouldn't remake perly.[ch].
-
- run_byacc:
- @ echo 'Expect' 130 shift/reduce and 1 reduce/reduce conflict
- $(YACC) -d perly.y
- sh $(shellflags) ./perly.fixer y.tab.c perly.c
- mv y.tab.h perly.h
- echo 'extern YYSTYPE yylval;' >>perly.h
- - perl vms/vms_yfix.pl perly.c perly.h vms/perly_c.vms vms/perly_h.vms
-
- # We don't want to regenerate perly.c and perly.h, but they might
- # appear out-of-date after a patch is applied or a new distribution is
- # made.
- perly.c: perly.y
- SetFile -m . $<
-
- perly.h: perly.y
- SetFile -m . $<
-
- # The following three header files are generated automatically
- # keywords.h: keywords.pl
- # opcode.h: opcode.pl
- # embed.h: embed.pl global.sym interp.sym
- # The correct versions should be already supplied with the perl kit,
- # in case you don't have perl available.
- # To force them to run, type
- # make regen_headers
- regen_headers:
- :perl keywords.pl
- :perl opcode.pl
- :perl embed.pl
-
- clean:
- rm -f *$(OBJ_EXT) *$(LIB_EXT) all perlmain.c
- rm -f perl.exp ext.libs
- -rm perl.export perl.dll perl.libexp perl.map perl.def
- -cd pod; $(MAKE) clean
- -cd utils; $(MAKE) clean
- -cd x2p; $(MAKE) clean
- -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
- sh ext/util/make_ext clean $$x ; \
- done
- rm -f perl suidperl miniperl $(perllib)
-
- realclean: clean
- -cd os2; rm -f Makefile
- -cd pod; $(MAKE) realclean
- -cd utils; $(MAKE) realclean
- -cd x2p; $(MAKE) realclean
- -@for x in $(DYNALOADER) $(dynamic_ext) $(static_ext) ; do \
- sh ext/util/make_ext realclean $$x ; \
- done
- rm -f *.orig */*.orig *~ */*~ core t/core t/c t/perl
- rm -rf $(addedbyconf)
- rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old
- rm -f $(private)
- rm -rf lib/auto
- rm -f lib/.exists
- rm -f h2ph.man pstruct
- rm -rf .config
- @echo "Note that make realclean does not delete config.sh"
-
- clobber: realclean
- rm -f config.sh cppstdin
-
- distclean: clobber
-
- test: miniperl perl preplibrary $(dynamic_ext)
- - cd t && chmod +x TEST */*.t
- - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT)) && ./perl TEST </dev/tty
-
- minitest: miniperl
- - cd t && chmod +x TEST */*.t
- - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
- && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t </dev/tty
-
- ":PLib:Perl.68K.Lib" : $(Objects68K)
- Set Echo 1
- If "{{Src68K}}" != ""
- ${C68K} -t -ext .68K.o {{Src68K}} -o :Obj:
- End
- $(Lib68K) -o :PLib:Perl.68K.Lib :Obj:{$(Objects68K)}
-
- ":PLib:Perl.680.Lib" : $(Objects680)
- Set Echo 1
- If "{{Src680}}" != ""
- ${C680} -t -ext .680.o {{Src680}} -o :Obj:
- End
- $(Lib680) -o :PLib:Perl.680.Lib :Obj:{$(Objects680)}
-
- ":PLib:Perl.PPC.Lib" : $(ObjectsPPC)
- Set Echo 1
- If "{{SrcPPC}}" != ""
- ${CPPC} -t -ext .PPC.o {{SrcPPC}} -o :Obj:
- End
- $(LibPPC) -o :PLib:Perl.PPC.Lib :Obj:{$(ObjectsPPC)}
-
- ":PLib:PerlLib.68K.Lib" : $(LibObjects68K)
- $(Lib68K) -o :PLib:PerlLib.68K.Lib :Obj:{$(LibObjects68K)}
- ":PLib:PerlLib.680.Lib" : $(LibObjects680)
- $(Lib680) -o :PLib:PerlLib.680.Lib :Obj:{$(LibObjects680)}
- ":PLib:PerlLib.PPC.Lib" : $(LibObjectsPPC)
- $(LibPPC) -o :PLib:PerlLib.PPC.Lib :Obj:{$(LibObjectsPPC)}
-